package com.jfok.server.controller;


import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.jfok.server.common.ActionResult;
import com.jfok.server.service.AuditingService;
import com.jfok.shared.TreeNodeRecord;

@Controller
@RequestMapping("/moduleauditing")
public class AuditingController {

	@Resource
	private AuditingService auditingService;

	

	@RequestMapping("/getmoduleauditinginfo.do")
	public @ResponseBody
	List<TreeNodeRecord> genAllModuleAuditingInfo(HttpServletRequest request) {
		return auditingService.genAllModuleAuditingInfo(request);
	}

	@RequestMapping("/allauditing.do")
	public @ResponseBody
	ActionResult autoAuditingAll(String moduleName, String parentFilter, HttpServletRequest request) {
		return auditingService.autoAuditingAll(moduleName, parentFilter, request);
	}

	@RequestMapping("/thiscondition.do")
	public @ResponseBody
	ActionResult autoAuditingThisCondition(String moduleName, String query, String columns,
			String navigates, String parentFilter, HttpServletRequest request) {
		return auditingService.autoAuditingThisCondition(moduleName, query, columns, navigates,
				parentFilter, request);
	}

	
	@RequestMapping("/pagerecord.do")
	public @ResponseBody
	ActionResult autoAuditingPageRecord(String moduleName, String ids, HttpServletRequest request) {
		return auditingService.autoAuditingPageRecord(moduleName, ids, request);
	}

}
